<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('房屋公开信息设置')"/>
    <th:block th:include="include :: datetimepicker-css"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <div class="row">
        <div class="col-sm-12">
            <div class="panel panel-info">
                <div class="panel-heading">
                    <i class="fa fa-info-circle" th:text="${dzmc}"></i>
                </div>
                <div class="panel-body">
                    <form class="form-horizontal m" id="form-house-edit">
                        <input name="houseDisplayId" th:field="${houseDisplay.houseDisplayId}" type="hidden">
                        <input name="dzbm" th:field="${houseDisplay.dzbm}" type="hidden">
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">使用形式:</label>
                                    <div class="col-sm-8">
                                        <label class="toggle-switch switch-solid">
                                            <input type="checkbox" id="syxs"
                                                   th:checked="(${houseDisplay.syxs}=='1') ? 'true' : 'false'">
                                            <span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">房屋用途:</label>
                                    <div class="col-sm-8">
                                        <label class="toggle-switch switch-solid">
                                            <input type="checkbox" id="fwytdm"
                                                   th:checked="(${houseDisplay.fwytdm}=='1') ? 'true' : 'false'">
                                            <span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">房屋类别:</label>
                                    <div class="col-sm-8">
                                        <label class="toggle-switch switch-solid">
                                            <input type="checkbox" id="fwlbdm"
                                                   th:checked="(${houseDisplay.fwlbdm}=='1') ? 'true' : 'false'">
                                            <span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">房屋性质:</label>
                                    <div class="col-sm-8">
                                        <label class="toggle-switch switch-solid">
                                            <input type="checkbox" id="fwcqxzzldm"
                                                   th:checked="(${houseDisplay.fwcqxzzldm}=='1') ? 'true' : 'false'">
                                            <span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">房屋间数:</label>
                                    <div class="col-sm-8">
                                        <label class="toggle-switch switch-solid">
                                            <input type="checkbox" id="fwjs"
                                                   th:checked="(${houseDisplay.fwjs}=='1') ? 'true' : 'false'">
                                            <span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">房屋面积:</label>
                                    <div class="col-sm-8">
                                        <label class="toggle-switch switch-solid">
                                            <input type="checkbox" id="fwmjMjpfm"
                                                   th:checked="(${houseDisplay.fwmjMjpfm}=='1') ? 'true' : 'false'">
                                            <span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">房屋产权证号:</label>
                                    <div class="col-sm-8">
                                        <label class="toggle-switch switch-solid">
                                            <input type="checkbox" id="fwcqzh"
                                                   th:checked="(${houseDisplay.fwcqzh}=='1') ? 'true' : 'false'">
                                            <span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">房主姓名:</label>
                                    <div class="col-sm-8">
                                        <label class="toggle-switch switch-solid">
                                            <input type="checkbox" id="fzXm"
                                                   th:checked="(${houseDisplay.fzXm}=='1') ? 'true' : 'false'">
                                            <span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">房主公民身份号码:</label>
                                    <div class="col-sm-8">
                                        <label class="toggle-switch switch-solid">
                                            <input type="checkbox" id="fzGmsfhm"
                                                   th:checked="(${houseDisplay.fzGmsfhm}=='1') ? 'true' : 'false'">
                                            <span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">房主联系电话:</label>
                                    <div class="col-sm-8">
                                        <label class="toggle-switch switch-solid">
                                            <input type="checkbox" id="fzLxdh"
                                                   th:checked="(${houseDisplay.fzLxdh}=='1') ? 'true' : 'false'">
                                            <span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">托管人姓名:</label>
                                    <div class="col-sm-8">
                                        <label class="toggle-switch switch-solid">
                                            <input type="checkbox" id="tgrXm"
                                                   th:checked="(${houseDisplay.tgrXm}=='1') ? 'true' : 'false'">
                                            <span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">托管人公民身份号码:</label>
                                    <div class="col-sm-8">
                                        <label class="toggle-switch switch-solid">
                                            <input type="checkbox" id="tgrGmsfhm"
                                                   th:checked="(${houseDisplay.tgrGmsfhm}=='1') ? 'true' : 'false'">
                                            <span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">托管人联系电话:</label>
                                    <div class="col-sm-8">
                                        <label class="toggle-switch switch-solid">
                                            <input type="checkbox" id="tgrLxdh"
                                                   th:checked="(${houseDisplay.tgrLxdh}=='1') ? 'true' : 'false'">
                                            <span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">房屋所属单位:</label>
                                    <div class="col-sm-8">
                                        <label class="toggle-switch switch-solid">
                                            <input type="checkbox" id="fwssdwDwmc"
                                                   th:checked="(${houseDisplay.fwssdwDwmc}=='1') ? 'true' : 'false'">
                                            <span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">登记单位:</label>
                                    <div class="col-sm-8">
                                        <label class="toggle-switch switch-solid">
                                            <input type="checkbox" id="djdwGajgmc"
                                                   th:checked="(${houseDisplay.djdwGajgmc}=='1') ? 'true' : 'false'">
                                            <span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">登记时间:</label>
                                    <div class="col-sm-8">
                                        <label class="toggle-switch switch-solid">
                                            <input type="checkbox" id="djsj"
                                                   th:checked="(${houseDisplay.djsj}=='1') ? 'true' : 'false'">
                                            <span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">核录时间:</label>
                                    <div class="col-sm-8">
                                        <label class="toggle-switch switch-solid">
                                            <input type="checkbox" id="hlsj"
                                                   th:checked="(${houseDisplay.hlsj}=='1') ? 'true' : 'false'">
                                            <span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">核录标识:</label>
                                    <div class="col-sm-8">
                                        <label class="toggle-switch switch-solid">
                                            <input type="checkbox" id="hlbz"
                                                   th:checked="(${houseDisplay.hlbz}=='1') ? 'true' : 'false'">
                                            <span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">数据来源:</label>
                                    <div class="col-sm-8">
                                        <label class="toggle-switch switch-solid">
                                            <input type="checkbox" id="sjly"
                                                   th:checked="(${houseDisplay.sjly}=='1') ? 'true' : 'false'">
                                            <span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6">
                                <div class="form-group">
                                    <label class="col-sm-4 control-label">标签:</label>
                                    <div class="col-sm-8">
                                        <label class="toggle-switch switch-solid">
                                            <input type="checkbox" id="bq"
                                                   th:checked="(${houseDisplay.bq}=='1') ? 'true' : 'false'">
                                            <span></span>
                                        </label>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-12">
                                <div class="form-group">
                                    <label class="col-xs-2 control-label">信息发布：</label>
                                    <div class="col-xs-10">
                                        <textarea name="gkxx" maxlength="300" class="form-control" rows="3">[[*{houseDisplay.gkxx}]]</textarea>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: datetimepicker-js"/>
<script type="text/javascript">
    var prefix = ctx + "control/display";

    $("#form-house-edit").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            var data = $("#form-house-edit").serializeArray();
            var syxs = $("input[id='syxs']").is(':checked') === true ? 1 : 0;
            var fwytdm = $("input[id='fwytdm']").is(':checked') === true ? 1 : 0;
            var fwlbdm = $("input[id='fwlbdm']").is(':checked') === true ? 1 : 0;
            var fwcqxzzldm = $("input[id='fwcqxzzldm']").is(':checked') === true ? 1 : 0;
            var fwjs = $("input[id='fwjs']").is(':checked') === true ? 1 : 0;
            var fwmjMjpfm = $("input[id='fwmjMjpfm']").is(':checked') === true ? 1 : 0;
            var fwcqzh = $("input[id='fwcqzh']").is(':checked') === true ? 1 : 0;
            var fzXm = $("input[id='fzXm']").is(':checked') === true ? 1 : 0;
            var fzGmsfhm = $("input[id='fzGmsfhm']").is(':checked') === true ? 1 : 0;
            var fzLxdh = $("input[id='fzLxdh']").is(':checked') === true ? 1 : 0;
            var tgrXm = $("input[id='tgrXm']").is(':checked') === true ? 1 : 0;
            var tgrGmsfhm = $("input[id='tgrGmsfhm']").is(':checked') === true ? 1 : 0;
            var tgrLxdh = $("input[id='tgrLxdh']").is(':checked') === true ? 1 : 0;
            var fwssdwDwmc = $("input[id='fwssdwDwmc']").is(':checked') === true ? 1 : 0;
            var djdwGajgmc = $("input[id='djdwGajgmc']").is(':checked') === true ? 1 : 0;
            var djsj = $("input[id='djsj']").is(':checked') === true ? 1 : 0;
            var hlsj = $("input[id='hlsj']").is(':checked') === true ? 1 : 0;
            var hlbz = $("input[id='hlbz']").is(':checked') === true ? 1 : 0;
            var sjly = $("input[id='sjly']").is(':checked') === true ? 1 : 0;
            var bq = $("input[id='bq']").is(':checked') === true ? 1 : 0;
            data.push({"name": "syxs", "value": syxs});
            data.push({"name": "fwytdm", "value": fwytdm});
            data.push({"name": "fwlbdm", "value": fwlbdm});
            data.push({"name": "fwcqxzzldm", "value": fwcqxzzldm});
            data.push({"name": "fwjs", "value": fwjs});
            data.push({"name": "fwmjMjpfm", "value": fwmjMjpfm});
            data.push({"name": "fwcqzh", "value": fwcqzh});
            data.push({"name": "fzXm", "value": fzXm});
            data.push({"name": "fzGmsfhm", "value": fzGmsfhm});
            data.push({"name": "fzLxdh", "value": fzLxdh});
            data.push({"name": "tgrXm", "value": tgrXm});
            data.push({"name": "tgrGmsfhm", "value": tgrGmsfhm});
            data.push({"name": "tgrLxdh", "value": tgrLxdh});
            data.push({"name": "fwssdwDwmc", "value": fwssdwDwmc});
            data.push({"name": "djdwGajgmc", "value": djdwGajgmc});
            data.push({"name": "djsj", "value": djsj});
            data.push({"name": "hlsj", "value": hlsj});
            data.push({"name": "hlbz", "value": hlbz});
            data.push({"name": "sjly", "value": sjly});
            data.push({"name": "bq", "value": bq});
            $.operate.save(prefix + "/setHouseDisplay", data);
        }
    }
</script>
</body>
</html>
